//@ sourceURL=ProblemDetailView.js
Ext.ns("ProblemDetailView");

ProblemDetailView = Ext.extend(Ext.Panel,{
    constructor : function(a) {
        Ext.applyIf(this, a);
        var all=this.initUIComponents();
        ProblemDetailView.superclass.constructor.call(this, {
            id : "ProblemDetailView",
            region : "center",
            layout : "border",
            border : false,
            iconCls : "menu-position",
            items : [all.yearGridPanel,all.yearGridSearchPanel]
        });
    },
    initUIComponents : function() {
    var yearGridComponents=new creategridview({
        topbar : {
            inputFormName : 'ProblemDetailForm',
            topbarAdd:{
                hidden:false
            },
            topbarDel:{
                hidden:false
            }
        },
        search : {
            items : [ {
                style : "margin:5px 5px 5px 5px;",
                text : "责任人"
            }, {
                columnWidth : 0.2,
                xtype : "textfield",
                name : "Q_dutyPerson_S_LK",
                maxLength : 256
            } ]
        },
        grid : {
            title : "问题明细列表",
            rowActions:true,
            listUrl : __ctxPath + "/safecheckplan/listProblemDetail.do?Q_problemDetailId_L_EQ="+this.problemDetailId,
            removeUrl : __ctxPath + "/safecheckplan/deleteProblemDetail.do",
            fields : [ "id","dutyPerson","measure","problemDetailId", "problemDescribe","solveCondition"],
            columns : [ {
                header : "id",
                dataIndex : "id",
                hidden : true
            },
            {
                header : "problemDetailId",
                dataIndex : "problemDetailId",
                hidden : true
            },{
                header : "责任人",
                dataIndex : "dutyPerson",
                width:80
            },{
                header : "措施",
                dataIndex : "measure",
                width:70
            },{
                header : "问题描述",
                dataIndex : "problemDescribe",
                width:80
            },{
                header : "解决情况",
                dataIndex : "solveCondition",
                width:80
            }]
        },
        formCfg : {
        	problemDetailId : this.problemDetailId
        }
       
    });
    return yearGridComponents;
}
});

